﻿<html dir="LTR" xmlns:ndoc="urn:ndoc-schema">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="history" name="save" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>Message.ToMailMessage Method</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />
  </head>
  <body id="bodyID" class="dtBODY">
    <div id="nsbanner">
      <div id="bannerrow1">
        <table class="bannerparthead" cellspacing="0">
          <tr id="hdr">
            <td class="runninghead">OpenPop.NET POP3 Library Documentation</td>
            <td class="product">
            </td>
          </tr>
        </table>
      </div>
      <div id="TitleRow">
        <h1 class="dtH1">Message.ToMailMessage Method</h1>
      </div>
    </div>
    <div id="nstext">
      <p> This method will convert this <a href="OpenPop~OpenPop.Mime.Message.html">Message</a> into a <a href="http://msdn.microsoft.com/en-us/library/System.Net.Mail.MailMessage(VS.80).aspx">MailMessage</a> equivalent.<br /> The returned <b>MailMessage</b> can be used with <a href="http://msdn.microsoft.com/en-us/library/System.Net.Mail.SmtpClient(VS.80).aspx">SmtpClient</a> to forward the email.<br /><br /> You should be aware of the following about this method: <ul type="disc"><li> All sender and receiver mail addresses are set. If you send this email using a <b>SmtpClient</b> then all receivers in To, From, Cc and Bcc will receive the email once again. </li><li> If you view the source code of this Message and looks at the source code of the forwarded <b>MailMessage</b> returned by this method, you will notice that the source codes are not the same. The content that is presented by a mail client reading the forwarded <b>MailMessage</b> should be the same as the original, though. </li><li> Content-Disposition headers will not be copied to the <b>MailMessage</b>. It is simply not possible to set these on Attachments. </li><li> HTML content will be treated as the preferred view for the <a href="http://msdn.microsoft.com/en-us/library/System.Net.Mail.MailMessage.Body(VS.80).aspx">Body</a>. Plain text content will be used for the <b>Body</b> when HTML is not available. </li></ul></p>
      <div class="syntax">public <a href="">MailMessage</a> ToMailMessage();</div>
      <h4 class="dtH4">Return Value</h4>
      <p>A <a href="http://msdn.microsoft.com/en-us/library/System.Net.Mail.MailMessage(VS.80).aspx">MailMessage</a> object that contains the same information that this Message does</p>
      <h4 class="dtH4">See Also</h4>
      <p>
        <a href="OpenPop~OpenPop.Mime.Message.html">Message Class</a> | <a href="~OpenPop.Mime.html">OpenPop.Mime Namespace</a></p>
      <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
        <param name="Keyword" value="ToMailMessage method&#xD;&#xA;									">
        </param>
        <param name="Keyword" value="ToMailMessage method, Message class">
        </param>
        <param name="Keyword" value="Message.ToMailMessage method&#xD;&#xA;									">
        </param>
      </object>
      <hr />
      <div id="footer">
        <p>
          <a href="mailto:hpop-users@lists.sourceforge.net?subject=OpenPop.NET%20POP3%20Library%20Documentation%20Documentation%20Feedback:%20Message.ToMailMessage Method ">Send comments on this topic.</a>
        </p>
        <p>
          <a href="http://creativecommons.org/publicdomain/zero/1.0/">Public Domain Dedication</a>
        </p>
        <p>Generated from assembly OpenPop [2.0.4.369] by <a href="http://ndoc3.sourceforget.net">NDoc3</a></p>
      </div>
    </div>
  </body>
</html>